package com.ws.entity.test02;

/**
 * @author 王硕
 * @version jdk21
 * @className Car
 * @description
 * @date 2024/11/5 19:06
 */
public class Car {
    //轮胎数量
    public int wheel;
    //颜色
    public String colour;
    //种类
    public String type;
    //价格
    public double  price;

    public void run(){
        if (wheel==4){
            System.out.println("这个车正在全速前进");
        }else {
            System.out.println("你的车子需要修理");
        }
    }

    public Car() {
    }

    public Car(int wheel, String colour, String type, double price) {
        this.wheel = wheel;
        this.colour = colour;
        this.type = type;
        this.price = price;
    }
}
